/*
 * @Author: humengchuan 531537052@qq.com
 * @Date: 2025-08-06 11:46:40
 * @LastEditors: humengchuan 531537052@qq.com
 * @LastEditTime: 2025-08-08 14:35:30
 * @FilePath: \project\work-tool\my-dev-project\src\utils\requestMethods.ts
 * @Description: 
 */
import request from "./request";

interface RequestParams {
  [key: string]: string | number | boolean | null | undefined;
}

export function get(url: string, params?: RequestParams) {
    return request.get(url, { params });
}

export function post(url: string, data?: unknown, options?: unknown) {
    return request.post(url, data, options);
}

export function put(url: string, data?: unknown) {
    return request.put(url, data);
}

export function del(url: string, params?: RequestParams) {
    return request.delete(url, { params });
}

export function patch(url: string, data?: unknown) {
    return request.patch(url, data);
}